﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LibFriesland_Campina_CRM
{
    public class BizNA
    {
        #region Thuoc tinh
        public string na_charid { get; set; }
        public string name { get; set; }
        public string phone { get; set; }
        public string email { get; set; }
        public string by_sup { get; set; }
        public string by_shop { get; set; }
        #endregion

        #region Ham thiet lap
        public BizNA() { }
        public BizNA(string pNa_charid)
        {
            na_charid = pNa_charid;
        }
        public BizNA(string pNa_charid, string pName)
        {
            na_charid = pNa_charid;
            name = pName;
        }
        public BizNA(string pNa_charid, string pName, string pPhone, string pEmail, string pBy_sup, string pBy_shop)
        {
            na_charid = pNa_charid;
            name = pName;
            phone = pPhone;
            email = pEmail;
            by_sup = pBy_sup;
            by_shop = pBy_shop;
        }
        #endregion

        #region Phuong thuc
        //Lay danh sach tat ca NA
        public static List<BizNA> getAll()
        {
            return DalNA.getAll();
        }

        //Lay thong tin NA
        public static BizNA getNabyID(string pNa_char_id)
        {
            return DalNA.getNAbyID(pNa_char_id);
        }

        //Lay sup_charid cua Sup quan ly NA
        public static string getSupIDbyNA(string pNa_charid)
        {
            return DalNA.getSupIDbyNA(pNa_charid);
        }
        #endregion
    }
}
